# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=luksipc
pkgver=0.01
pkgrel=2
groups=('blackarch' 'blackarch-crypto')
pkgdesc='A tool to convert unencrypted block devices to encrypted LUKS devices in-place.'
arch=('x86_64' 'aarch64')
url='http://www.johannes-bauer.com/linux/luksipc'
license=('GPL3')
source=("http://www.johannes-bauer.com/linux/$pkgname/$pkgname-$pkgver.tar.gz"
        'return_code.patch')
sha512sums=('c008af577da22cefcc7076f3c79bba1f67c53d3551b0b18706764b45d3ee9057154f1b13bd51c087b24456549e6b7004ffe8c177e443f8fe04ec1eb5a3f343dc'
            'c9718fadc80b17a68e091b7b74b5ef2a081b8944476f9d31f4574641a47e643775371097e7db69b0f20b62ede096ce85416e20fbafcd3ebc3d88e20c35b9329f')

prepare() {
  cd "$pkgname-$pkgver"

  patch -p1 < $srcdir/return_code.patch
}

build() {
	cd "$pkgname-$pkgver"

  make all
}

package() {
	cd "$pkgname-$pkgver"

	install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" ChangeLog
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

